package com.jsj.subway.ai.utils;

import com.alibaba.ttl.TransmittableThreadLocal;

public class SSEContextHolder {

    //当前线程(包括子线程以及线程池的中的子线程)的上下文
    private static ThreadLocal<String> content = new TransmittableThreadLocal<>();

    public static String get() {
        return content.get();
    }

    public static void set(String context) {
        content.set(context);
    }

    public static void remove() {
        content.remove();
    }

}
